package sample.bean.cfg;

import java.util.ArrayList;

public class ReplyRule {
    public boolean match(String text){
        for(String sub:this.keywords){
            if(text.indexOf(sub)!=-1){
                return true;
            }
        }
        return false;
    }


    private ArrayList<String> keywords;
    private ArrayList<Reply> reply=new ArrayList<>();

    public ArrayList<String> getKeywords() {
        return keywords;
    }

    public void setKeywords(ArrayList<String> keywords) {
        this.keywords = keywords;
    }

    public ArrayList<Reply> getReply() {
        return reply;
    }

    public void setReply(ArrayList<Reply> reply) {
        this.reply = reply;
    }
}
